package com.itheima.Enum;

public enum UserStatusTypeEnum {
    DOPE(0,"正常"),
    UNDOPE(1,"停用");
    private Integer status;
    private String desc;
    UserStatusTypeEnum(Integer status,String desc){
        this.desc = desc;
        this.status = status;
    }

    public UserStatusTypeEnum getStatus (Integer status){
        if (status!=null){
            for (UserStatusTypeEnum item: UserStatusTypeEnum.values()){
                if (item.getStatus().equals(status)) {
                    return item;
                }
            }
        }
        return null;
    }


    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
